﻿@model EditForumPostModel
@using Nop.Core.Domain.Forums;
@using Nop.Web.Extensions;
@using Nop.Web.Models.Boards;
@Html.Action("ForumBreadcrumb", new { forumTopicId = Model.ForumTopicId })


<div class="features_items"><!--features_items-->
    <h2 class="title text-center">@if (Model.IsEdit)
            {
                @T("Forum.EditPost")
            }
            else
            {
                @T("Forum.NewPost")
            }</h2>
    <div class="custom-page-box-div">
        @using (Html.BeginForm())
            {
                <div class="message-error">
                    @Html.ValidationSummary(true)
                </div>
                @Html.HiddenFor(model => model.Id)
                @Html.HiddenFor(model => model.ForumTopicId)

                <div class="form-fields">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label>@T("Forum.ForumName"):</label>
                        </div>
                        <div class="col-md-6">
                            <strong>@Model.ForumName</strong>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label>@T("Forum.TopicTitle"):</label>
                        </div>
                        <div class="col-md-6">
                            @Model.ForumTopicSubject
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-offset-2 col-md-6">
                            @if (Model.ForumEditor == EditorType.BBCodeEditor)
                            {
                                @Html.BBCodeEditor("Text")
                            }
                            @Html.TextAreaFor(model => model.Text, new { @class = "forum-post-text gray-textarea", TextMode = "MultiLine", rows="10" })
                        </div>
                        <div class="col-md-4">
                            @Html.ValidationMessageFor(model => model.Text)
                        </div>
                    </div>


                    @if (Model.IsCustomerAllowedToSubscribe)
                    {
                        <div class="form-group row">
                            <div class="col-md-2">
                                <label>@T("Forum.Options"):</label>
                            </div>
                            <div class="col-md-6">
                                @Html.EditorFor(model => model.Subscribed)
                                <span>@T("Forum.NotifyWhenSomeonePostsInThisTopic")</span>
                            </div>
                            
                        </div>
                    }
                    
                </div>
                <div class="buttons">
                    <input type="submit" value="@T("Forum.Submit")" class="btn btn-primary" />
                    <input type="button" class="btn btn-primary" value="@T("Forum.Cancel")" onclick="setLocation('@Url.RouteUrl("TopicSlug", new { id = Model.ForumTopicId, slug = Model.ForumTopicSeName })')" />
                </div>
            }
    </div>
</div>




